1. Field of the Invention
The present invention relates to an information processing apparatus, a method of controlling the same, and a storage medium.
2. Description of the Related Art
A printer apparatus such as a printer, a multi-function peripheral, or the like, that has a USB (Universal Serial Bus) I/F (interface) communicates through the USB I/F to a host PC (PC), and receives and performs printing of print data which is transmitted from the PC. In the case that this kind of printer apparatus communicates with a PC via a USB I/F, communication is performed while a handshake is performed between a print driver that exists on the PC, and a module which performs print processing on the printer apparatus. There exist two types of communication for this kind of communication between a PC and a printer apparatus: bidirectional communication and unidirectional communication.
In addition to bidirectional communication and unidirectional communication via the USB I/F, the PC is always in charge of communication control, and it is not possible for the printer apparatus to have the control. However, in the case of the bidirectional communication, since it is possible to communicate an intent of the printer apparatus, in the case that the printer apparatus wishes to transition to a sleep state, a transition to sleep state may be performed after a handshake is performed with the PC before the transition to the sleep state. On the other hand, in the case of the unidirectional communication, since it is not possible to notify the PC of the intent of a printer apparatus, even in a case where the printer apparatus wishes to transition to the sleep state, it is not able to notify the PC of the transition into the sleep state.
Japanese Patent Laid-Open No. 2007-68156 describes that, when a printer advances processing for transitioning to a sleep state, DMA for receiving data is stopped, and thereafter a printer is set such that it responds with a NAK (Negative ACKnowledge).
When the printer apparatus transitions to a sleep state, there is a possibility that when print data is transmitted from the PC to the printer apparatus, due to the transmission timing, a part of the print data is received, and there is the remaining data disappears. However, in the above described Japanese Patent Laid-Open No. 2007-68156, support is not made for an action in the case when timing for a printer performing transition processing to a sleep state and timing for print data being transmitted from a PC to the printer matches during the unidirectional communication.